package com.teamwork_backend.mapper;

import com.teamwork_backend.entity.Companys;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.teamwork_backend.entity.ov.CompanysListView;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author windy
 * @since 2021-04-25
 */
public interface CompanysDao extends BaseMapper<Companys> {
    @Select("SELECT companys.companyid,account,name,logo,website,registerdate,address,phone,intro residence FROM companys LEFT JOIN `company_info` on companys.companyid = company_info.companyid WHERE type = #{type}")
    List<CompanysListView> getCompanyInfo(@Param("type") int type);

}
